package com.dingding.study.Event.serviceImpl;


import com.dingding.study.Event.service.Event;

import java.io.Serializable;
import java.util.Date;

public class DomainEvent<T> implements Event, Serializable {

    private static final long serialVersionUID = 1L;

    private T object;

    private Date happedTime;

    private String sequence;

    public DomainEvent(T object) {
        this.object = object;
        this.happedTime = new Date();
    }

    public T getDomainObject() {
        return this.object;
    }

    public Date getHappedTime() {
        return happedTime;
    }

    public void setHappedTime(Date happedTime) {
        this.happedTime = happedTime;
    }

    public String getSequence() {
        return sequence;
    }

    public void setSequence(String sequence) {
        this.sequence = sequence;
    }

}
